home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib / tk / toplevel.man < prev    next >
Encoding:
Text File  |  1992-08-24  |  8.0 KB  |  282 lines

  1. '\"
  2. '\" Copyright 1990 Regents of the University of California
  3. '\" Permission to use, copy, modify, and distribute this
  4. '\" documentation for any purpose and without fee is hereby
  5. '\" granted, provided that this notice appears in all copies.
  6. '\" The University of California makes no representations about
  7. '\" the suitability of this material for any purpose.  It is
  8. '\" provided "as is" without express or implied warranty.
  9. '\" 
  10. '\" $Header: /user6/ouster/wish/man/RCS/toplevel.man,v 1.5 91/12/06 10:43:04 ouster Exp $ SPRITE (Berkeley)
  11. '/" 
  12. .\" The definitions below are for supplemental macros used in Sprite
  13. .\" manual entries.
  14. .\"
  15. .\" .HS name section [date [version]]
  16. .\"    Replacement for .TH in other man pages.  See below for valid
  17. .\"    section names.
  18. .\"
  19. .\" .AP type name in/out [indent]
  20. .\"    Start paragraph describing an argument to a library procedure.
  21. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  22. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  23. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  24. .\"    needed;  use .AS below instead)
  25. .\"
  26. .\" .AS [type [name]]
  27. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  28. .\"    name are examples of largest possible arguments that will be passed
  29. .\"    to .AP later.  If args are omitted, default tab stops are used.
  30. .\"
  31. .\" .BS
  32. .\"    Start box enclosure.  From here until next .BE, everything will be
  33. .\"    enclosed in one large box.
  34. .\"
  35. .\" .BE
  36. .\"    End of box enclosure.
  37. .\"
  38. .\" .VS
  39. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  40. .\"    of man pages.
  41. .\"
  42. .\" .VE
  43. .\"    End of vertical sidebar.
  44. .\"
  45. .\" .DS
  46. .\"    Begin an indented unfilled display.
  47. .\"
  48. .\" .DE
  49. .\"    End of indented unfilled display.
  50. .\"
  51. '\"    # Heading for Sprite man pages
  52. .de HS
  53. .if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  54. .if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  55. .if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  56. .if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  57. .if t .wh -1.3i ^B
  58. .nr ^l \\n(.l
  59. .ad b
  60. ..
  61. '\"    # Start an argument description
  62. .de AP
  63. .ie !"\\$4"" .TP \\$4
  64. .el \{\
  65. .   ie !"\\$2"" .TP \\n()Cu
  66. .   el          .TP 15
  67. .\}
  68. .ie !"\\$3"" \{\
  69. .ta \\n()Au \\n()Bu
  70. \&\\$1    \\fI\\$2\\fP    (\\$3)
  71. .\".b
  72. .\}
  73. .el \{\
  74. .br
  75. .ie !"\\$2"" \{\
  76. \&\\$1    \\fI\\$2\\fP
  77. .\}
  78. .el \{\
  79. \&\\fI\\$1\\fP
  80. .\}
  81. .\}
  82. ..
  83. '\"    # define tabbing values for .AP
  84. .de AS
  85. .nr )A 10n
  86. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  87. .nr )B \\n()Au+15n
  88. .\"
  89. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  90. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  91. ..
  92. '\"    # BS - start boxed text
  93. '\"    # ^y = starting y location
  94. '\"    # ^b = 1
  95. .de BS
  96. .br
  97. .mk ^y
  98. .nr ^b 1u
  99. .if n .nf
  100. .if n .ti 0
  101. .if n \l'\\n(.lu\(ul'
  102. .if n .fi
  103. ..
  104. '\"    # BE - end boxed text (draw box now)
  105. .de BE
  106. .nf
  107. .ti 0
  108. .mk ^t
  109. .ie n \l'\\n(^lu\(ul'
  110. .el \{\
  111. .\"    Draw four-sided box normally, but don't draw top of
  112. .\"    box if the box started on an earlier page.
  113. .ie !\\n(^b-1 \{\
  114. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  115. .\}
  116. .el \}\
  117. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  118. .\}
  119. .\}
  120. .fi
  121. .br
  122. .nr ^b 0
  123. ..
  124. '\"    # VS - start vertical sidebar
  125. '\"    # ^Y = starting y location
  126. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  127. .de VS
  128. .mk ^Y
  129. .ie n 'mc \s12\(br\s0
  130. .el .nr ^v 1u
  131. ..
  132. '\"    # VE - end of vertical sidebar
  133. .de VE
  134. .ie n 'mc
  135. .el \{\
  136. .ev 2
  137. .nf
  138. .ti 0
  139. .mk ^t
  140. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  141. .sp -1
  142. .fi
  143. .ev
  144. .\}
  145. .nr ^v 0
  146. ..
  147. '\"    # Special macro to handle page bottom:  finish off current
  148. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  149. '\"    # page bottom macro.
  150. .de ^B
  151. .ev 2
  152. 'ti 0
  153. 'nf
  154. .mk ^t
  155. .if \\n(^b \{\
  156. .\"    Draw three-sided box if this is the box's first page,
  157. .\"    draw two sides but no top otherwise.
  158. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  159. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  160. .\}
  161. .if \\n(^v \{\
  162. .nr ^x \\n(^tu+1v-\\n(^Yu
  163. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  164. .\}
  165. .bp
  166. 'fi
  167. .ev
  168. .if \\n(^b \{\
  169. .mk ^y
  170. .nr ^b 2
  171. .\}
  172. .if \\n(^v \{\
  173. .mk ^Y
  174. .\}
  175. ..
  176. '\"    # DS - begin display
  177. .de DS
  178. .RS
  179. .nf
  180. .sp
  181. ..
  182. '\"    # DE - end display
  183. .de DE
  184. .fi
  185. .RE
  186. .sp .5
  187. ..
  188. .HS toplevel cmds
  189. .BS
  190. '\" Note:  do not modify the .SH NAME line immediately below!
  191. .SH NAME
  192. toplevel \- Create and manipulate toplevel widgets
  193. .SH SYNOPSIS
  194. \fBtoplevel\fI \fIpathName \fR?\fB\-screen \fIscreenName\fR? ?\fB\-class \fIclassName\fR? ?\fIoptions\fR?
  195. .SH "STANDARD OPTIONS"
  196. .LP
  197. .nf
  198. .ta 4c 8c 12c
  199. \fBbackground\fR    \fBgeometry\fR
  200. \fBborderWidth\fR    \fBrelief\fR
  201. .fi
  202. .LP
  203. See the ``options'' manual entry for details on the standard options.
  204. .SH "WIDGET-SPECIFIC OPTIONS"
  205. .BE
  206.  
  207. .SH DESCRIPTION
  208. .PP
  209. The \fBtoplevel\fR command creates a new toplevel widget (given
  210. by the \fIpathName\fR argument).  Additional
  211. options, described above, may be specified on the command line
  212. or in the option database
  213. to configure aspects of the toplevel such as its background color
  214. and relief.  The \fBtoplevel\fR command returns the
  215. path name of the new window.
  216. .PP
  217. A toplevel is similar to a frame except that it is created as a
  218. top-level window:  its X parent is the root window of a screen
  219. rather than the logical parent from its path name.  The primary
  220. purpose of a toplevel is to serve as a container for dialog boxes
  221. and other collections of widgets.  The only features
  222. of a toplevel are its background color and an optional 3-D border
  223. to make the toplevel appear raised or sunken.
  224. .PP
  225. Two special command-line options may be provided to the \fBtoplevel\fR
  226. command:  \fB\-class\fR and \fB\-screen\fR.  If \fB\-class\fR
  227. is specified, then the new widget's class will be set to
  228. \fIclassName\fR instead of \fBToplevel\fR.  Changing the class of
  229. a toplevel widget may be useful
  230. in order to use a special class name in database options referring
  231. to this widget and its children.  The \fB\-screen\fR option
  232. may be used to place the window on a different screen than the
  233. window's logical parent.  Any valid screen name may be used, even
  234. one associated with a different display.
  235. .PP
  236. Note:  \fB\-class\fR and \fB\-screen\fR are handled
  237. differently than other command-line options.  They may not be specified
  238. using the option database (these options must have been processed
  239. before the new window has been created enough to use the option database;
  240. in particular, the new class name will affect the lookup of options
  241. in the database).  In addition, \fB\-class\fR and \fB\-screen\fR
  242. may not be queried or changed using the \fBconfig\fR command described
  243. below.  However, the \fBwinfo class\fR command may be used to query
  244. the class of a window, and \fBwinfo screen\fR may be used to query
  245. its screen.
  246.  
  247. .SH "WIDGET COMMAND"
  248. .PP
  249. The \fBtoplevel\fR command creates a new Tcl command whose
  250. name is the same as the path name of the toplevel's window.  This
  251. command may be used to invoke various
  252. operations on the widget.  It has the following general form:
  253. .DS C
  254. \fIpathName option \fR?\fIarg arg ...\fR?
  255. .DE
  256. \fIPathName\fR is the name of the command, which is the same as
  257. the toplevel widget's path name.  \fIOption\fR and the \fIarg\fRs
  258. determine the exact behavior of the command.  The following
  259. commands are possible for toplevel widgets:
  260. .TP
  261. \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
  262. Query or modify the configuration options of the widget.
  263. If no \fIoption\fR is specified, returns a list describing all of
  264. the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
  265. information on the format of this list).  If \fIoption\fR is specified
  266. with no \fIvalue\fR, then the command returns a list describing the
  267. one named option (this list will be identical to the corresponding
  268. sublist of the value returned if no \fIoption\fR is specified).  If
  269. one or more \fIoption\-value\fR pairs are specified, then the command
  270. modifies the given widget option(s) to have the given value(s);  in
  271. this case the command returns an empty string.
  272. \fIOption\fR may have any of the values accepted by the \fBtoplevel\fR
  273. command.
  274.  
  275. .SH BINDINGS
  276. .PP
  277. When a new toplevel is created, it has no default event bindings:
  278. toplevels are not intended to be interactive.
  279.  
  280. .SH KEYWORDS
  281. toplevel, widget
  282.